package com.letv.whatslive.model.dto;

import com.letv.whatslive.common.utils.ObjectUtils;
import com.letv.whatslive.model.AppInfo;
import com.letv.whatslive.model.CountryCode;
import lombok.Getter;
import lombok.Setter;

/**
 * Created by haojiayao on 16-1-5.
 */
@Getter
@Setter
public class CountryCodeDTO {

    private Long id; // ID
    private String code; //
    private String countryName; //
    private String countryNameEnglish;//国家名称英文
    private String countryNamePinYin;//国家名称汉语拼音

    public CountryCodeDTO() {}

    public CountryCodeDTO(CountryCode countryCode) {

        this.id = ObjectUtils.toLong(countryCode.getId());
        this.code = "+"+ObjectUtils.toString(countryCode.getCode());
        this.countryName = ObjectUtils.toString(countryCode.getCountryName());
        this.countryNameEnglish=ObjectUtils.toString(countryCode.getCountryNameEnglish());
        this.countryNamePinYin=ObjectUtils.toString(countryCode.getCountryNamePinYin());
    }
}
